home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************
- * *
- * The SB-Prolog System *
- * Copyright SUNY at Stony Brook, 1986; University of Arizona, 1987 *
- * *
- ************************************************************************/
-
- /*-----------------------------------------------------------------
- SB-Prolog is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY. No author or distributor
- accepts responsibility to anyone for the consequences of using it
- or for whether it serves any particular purpose or works at all,
- unless he says so in writing. Refer to the SB-Prolog General Public
- License for full details.
-
- Everyone is granted permission to copy, modify and redistribute
- SB-Prolog, but only under the conditions described in the
- SB-Prolog General Public License. A copy of this license is
- supposed to have been given to you along with SB-Prolog so you
- can know your rights and responsibilities. It should be in a
- file named COPYING. Among other things, the copyright notice
- and this notice must be preserved on all copies.
- ------------------------------------------------------------------ */
-
- /****************************************************************************
- * *
- * This file has been changed by to include Modules Extensions *
- * Changes by : Brian Paxton 1991/92 *
- * Last update : June 1992 *
- * *
- * Organisation : University of Edinburgh. *
- * For : Departments of Computer Science and Artificial Intelligence *
- * Fourth Year Project. *
- * *
- ****************************************************************************/
-
- /* $bio.P */
-
- $bio_export([$writename/1,$writeqname/1,$put/1,$nl/0,$tab/1,
- $tell/1,$tell/2,$telling/1,$told/0,$get/1,$get0/1,$see/1,$seeing/1,
- $seen/0,$write4/1]).
-
- % $bio_use : $modules
-
- % $writename/1
- % Drop tag before printing argument.
-
- $writename(Arg) :-
- ( $atom(Arg) ; $structure(Arg) ),
- $functor0(Arg, X),
- $dismantle_name(X,Y,Tag),
- $isa_structuretag(Tag),
- $writename0(Y),!.
-
- $writename(X) :- $writename0(X).
-
- $writename0(T) :- '_$builtin'(133).
-
- % $writeqname/1
- % Drop tag before printing argument.
-
- $writeqname(Arg) :-
- ( $atom(Arg) ; $structure(Arg) ),
- $functor0(Arg, X),
- $dismantle_name(X,Y,Tag),
- $isa_structuretag(Tag),
- $writeqname0(Y),!.
-
- $writeqname(X) :- $writeqname0(X).
-
- $writeqname0(P) :- '_$builtin'(130).
-
- $put(N) :-
- integer(N) ->
- $put0(N) ;
- ( $writename('*** Error: noninteger argument to put/1: '),
- $write(N),
- $nl).
-
- $put0(N) :- '_$builtin'(24).
-
- $nl :- $put(10).
-
- $tab(N) :-
- integer(N) ->
- $tab0(N) ;
- ( $writename('*** Error: noninteger argument to tab/1: '),
- $write(N),
- $nl).
-
- $tab0(N) :- '_$builtin'(25).
-
- $tell(D) :-
- $atom(D) ->
- $tell(D,0) ;
- ( $writename('*** Error: nonatom argument to tell/1'),
- $nl).
-
- $tell(D,Openflag) :- '_$builtin'(33).
-
- $telling(F) :- '_$builtin'(34).
-
- $told :- '_$builtin'(35).
-
-
- $get(N) :- '_$builtin'( 19 ).
-
- $get0(N) :- '_$builtin'( 18 ).
-
- $see(F) :-
- $atom(F) ->
- $see0(F) ;
- ( $writename('*** Error: nonatom argument to see/1'),
- $nl).
-
- $see0(F) :- '_$builtin'(30).
-
- $seeing(F) :- '_$builtin'(31).
-
- $seen :- '_$builtin'(32).
-
- $write4(X) :- '_$builtin'(59).
-
-